package cn.gson.springmvc.controller;



import cn.gson.springmvc.model.services.RoomServiceLt;
import com.alibaba.fastjson.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
public class RoomControllerLt {

    @Autowired
    RoomServiceLt roomServiceLt;

    @RequestMapping("room-all")
    @ResponseBody
    public Map<String,Object> leixifindAdd(){
        JSONArray jsonpObject =roomServiceLt.roomfinall();
        Map<String,Object> map=new HashMap<>();
        map.put("rows",jsonpObject);
        System.out.println("所有手术室："+map);
        return map;
    }



}

